package com.huanzhidadi.springsecurity.feign;

import com.huanzhidadi.springsecurity.config.FeignConfiguration;
import com.huanzhidadi.springsecurity.model.BaseResultVO;
import com.huanzhidadi.springsecurity.model.ItemVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "feignService2", configuration = FeignConfiguration.class)
public interface FeignService {

    @RequestMapping(value = "feign/requestBody", method = RequestMethod.POST)
    BaseResultVO requestBody(@RequestBody ItemVO itemVO);

    @RequestMapping(value = "feign/requestDelay", method = RequestMethod.POST)
    BaseResultVO requestDelay(@RequestBody ItemVO itemVO);

    @RequestMapping(value = "feign/transUserToken", method = RequestMethod.POST)
    BaseResultVO transUserToken(@RequestBody ItemVO itemVO, @RequestParam String token);

    @RequestMapping(value = "feign/transUserWithoutToken", method = RequestMethod.POST)
    BaseResultVO transUserWithoutToken(@RequestBody ItemVO itemVO);

    @RequestMapping(value = "feign/transUserWithGetReq", method = RequestMethod.GET)
    public BaseResultVO transUserWithGetReq();
}
